#pragma once

namespace RenderSystem
{
	class FD3D9SamplerState 
		: public Common::FRefCountedObject, public TFDynamicRHIResource<RRT_SamplerState>
	{
	public:

		D3DTEXTUREFILTERTYPE MagFilter;
		D3DTEXTUREFILTERTYPE MinFilter;
		D3DTEXTUREFILTERTYPE MipFilter;
		D3DTEXTUREADDRESS AddressU;
		D3DTEXTUREADDRESS AddressV;
		D3DTEXTUREADDRESS AddressW;
		DWORD MipMapLODBias;
	};

	class FD3D9RasterizerState 
		: public Common::FRefCountedObject, public TFDynamicRHIResource<RRT_RasterizerState>
	{
	public:

		D3DFILLMODE FillMode;
		D3DCULL CullMode;
		FLOAT DepthBias;
		FLOAT SlopeScaleDepthBias;
	};

	class FD3D9DepthState 
		: public Common::FRefCountedObject, public TFDynamicRHIResource<RRT_DepthState>
	{
	public:

		bool bZEnable;
		bool bZWriteEnable;
		D3DCMPFUNC ZFunc;
	};

	class FD3D9StencilState 
		: public Common::FRefCountedObject, public TFDynamicRHIResource<RRT_StencilState>
	{
	public:

		bool bStencilEnable;
		bool bTwoSidedStencilMode;
		D3DCMPFUNC StencilFunc;
		D3DSTENCILOP StencilFail;
		D3DSTENCILOP StencilZFail;
		D3DSTENCILOP StencilPass;
		D3DCMPFUNC CCWStencilFunc;
		D3DSTENCILOP CCWStencilFail;
		D3DSTENCILOP CCWStencilZFail;
		D3DSTENCILOP CCWStencilPass;
		DWORD StencilReadMask;
		DWORD StencilWriteMask;
		DWORD StencilRef;
	};

	class FD3D9BlendState 
		: public Common::FRefCountedObject, public TFDynamicRHIResource<RRT_BlendState>
	{
	public:

		bool bAlphaBlendEnable;
		D3DBLENDOP ColorBlendOperation;
		D3DBLEND ColorSourceBlendFactor;
		D3DBLEND ColorDestBlendFactor;
		bool bSeparateAlphaBlendEnable;
		D3DBLENDOP AlphaBlendOperation;
		D3DBLEND AlphaSourceBlendFactor;
		D3DBLEND AlphaDestBlendFactor;
		bool bAlphaTestEnable;
		D3DCMPFUNC AlphaFunc;
		DWORD AlphaRef;
	};
}